<template>
  <div>staff1111
    <button @click="btnClick">阿牛</button>
  </div>
</template>
<script setup lang="ts">
import utils from "@/utils.ts";
import { reactive } from "vue";
const { msg } = reactive({ msg: "hello" });
var obj = utils.myCreate({ name: "zhangsan" ,age: 33});
function intro(msg,msg2) {
  console.log(this.name + '-' + this.age + '--' + msg + msg2)
}
function myApply(msg= '',msg2='') {
  console.log(this.name + '-' + this.age + '--' + msg + msg2)
}
// intro()
utils.myCall()
utils.myApply()
utils.myBind()
intro.myCall(obj,'台风要来了','注意安全')
myApply.myApply(obj,['台风要来了1','注意安全1'])
myApply.myApply(obj)
var myIntro = intro.bind(obj)
var myIntro2 = intro.myBind(obj)
myIntro('台风要来了2','注意安全2')
myIntro2('台风要来了3','注意安全3')
console.log(`utils`, utils)
// debfun()
function fn(a,b,c,d,e) {
  console.log(a,b,c,d,e)
}
let _fn = utils.curry(fn);
_fn(1,2,3,4,5);
_fn(1)(2)(3,4,5);
var arr = [1,2,3,{name: 111}]
var arr2 = utils.deepCopy(arr);
arr[3].name = 222
console.log('arr',arr)
console.log('arr2',arr2)
var date = utils.dateFormat(new Date(),'yyyy年MM--dd')
var randomArray = utils.randomArray(arr)
console.log(`date`, date)
console.log(`randomArray`, randomArray)
console.log(`getArraySum()`, utils.getArraySum([1,2,3,4]))
var str = [1,2,3,[[4]]].toString()
var str2 = {name:{age:1}}.toString()
console.log('str',str)
console.log('str2',str2)
console.clear()
var obj1 = {name: 123,age:11};
var obj2 = {age:11,name: 123};
console.log(utils.isObjEqual(obj1,obj2))

</script>
<style lang="scss">
</style>